= user_title_bar(@user)

%div{:style => "text-align: center; font-size: 12px"}
  Problem: 
  - if @test_request.problem!=nil
    = "#{@test_request.problem.full_name}"
  - else
    = "(n/a)"
  %br/
  = "Submission: #{@test_request.submission.number}"
  %br/
  = "Test submitted at: #{format_short_time(@test_request.submitted_at)}"
  %br/
  = "Execution time: #{@test_request.running_time} s."
  %br/
  = "Memory usage: #{@test_request.memory_usage}kb"
  %br/
  %b= @test_request.exit_status
  %br/

- if @test_request.compiler_message!=nil and @test_request.compiler_message!=''
  %b Compiler Message
  %div{:style => "border: 1px solid black; background: lightgrey"}
    = simple_format((@test_request.compiler_message or ''))

%b Input (first 2kb)
%div{:style => "border: 1px solid black; background: lightgrey"}
  - if @test_request.input_file_name!=nil
    %pre
      = ""
      = h(read_textfile(@test_request.input_file_name,2048))

%b Output (first 2kb)
%div{:style => "border: 1px solid black; background: lightgrey"}
  - if @test_request.output_file_name!=nil
    %pre
      = ""
      = h(read_textfile(@test_request.output_file_name,2048))
  - else
    (no output)
